using OracleInternal.Common;

namespace OracleInternal.MTS
{
	internal class MTSTxnRMWorker
	{
		public event OnPrepareEventHandler PrepareEvent;

		public event OnCommitEventHandler CommitEvent;

		public event OnAbortEventHandler AbortEvent;

		public event OnSinglePhaseEventHandler SinglePhaseEvent;

		~MTSTxnRMWorker()
		{
		}

		public void OnPrepare(OnPrepareEventArgs e)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4352, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnPrepare);
			}
			this.PrepareEvent(this, e);
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4608, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnPrepare);
			}
		}

		public void OnCommit(OnCommitEventArgs e)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4352, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnCommit);
			}
			this.CommitEvent(this, e);
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4608, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnCommit);
			}
		}

		public void OnAbort(OnAbortEventArgs e)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4352, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnAbort);
			}
			this.AbortEvent(this, e);
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4608, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnAbort);
			}
		}

		public void OnSinglePhase(OnSinglePhaseEventArgs e)
		{
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4352, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnSinglePhase);
			}
			this.SinglePhaseEvent(this, e);
			if (ProviderConfig.m_bTraceLevelPrivate)
			{
				Trace.Write(OracleTraceLevel.Private, (OracleTraceTag)4608, OracleTraceClassName.MTSTxnRMWorker, OracleTraceFuncName.OnSinglePhase);
			}
		}
	}
}
